View Issue Details

IDProjectCategoryView StatusLast Update
0001904T99X171.00 SKB EagleSW Issuepublic2024-03-28 12:04
Reporter(ALTech) JunGyu Kim Assigned To(SW) Jerry Lin Due Date2024-03-25 15:34
PriorityhighSeveritys4-minorReproducibilityalways
Status closedResolutionfixed 
Summary0001904: [ATV12] android.intent.action.HDMI_PLUGGED is not occur when insert / remove HDMI cable
DescriptionHi Kerwin,

When I remove / insert HDMI cable on STB, expected occurt android.intent.action.HDMI_PLUGGED intent but currently, the intent is not occurring.
I can only see android.media.action.HDMI_AUDIO_PLUG intent is occur.

Jira ticket : https://jira.skbroadband.com/browse/BPM-30300

Expected result :
Occurring android.intent.action.HDMI_PLUGGED intent when insert / remove HDMI cable on STB

Current result :
There are no android.intent.action.HDMI_PLUGGED intent
Only android.media.action.HDMI_AUDIO_PLUG is occurring

It is not yet clear from which version this issue occurs.
I have tested FW 15.537.72 and this version is occurring this issue.

Please help to check this issue.

Thank you.
Kim
TagsNo tags attached.
Attach Tags

Users monitoring this issue

Activities

(ALTech) JunGyu Kim

2024-03-21 08:52

developer   ~0015274

Hi Jerry.

Please update progress of this issue.

Thank you.
Kim

(ALTech) JunGyu Kim

2024-03-25 12:19

developer   ~0015290

Hi Jerry,

This issue must be fix until tomorrow.
Please update the progress of this issue.

Thank you.
Kim

(ALTech) JunGyu Kim

2024-03-25 13:38

developer   ~0015291

Hi Jerry,

Additionally, this issue is not reproduce on INTEK box.
So I compared with INTEK box.

When I remove HDMI cable,
// INTEK box
03-25 14:24:02.301 3932 4633 I SystemControlEvent: system control callback event: 2
03-25 14:24:02.305 3932 4633 I SystemControlEvent: system control callback event: 4

// BFX-AT100
03-25 14:20:34.972 4190 4644 I SystemControlEvent: system control callback event: 4


// vendor/amlogic/common/frameworks/core/java/com/droidlogic/app/SystemControlEvent.java
    //must sync with DisplayMode.h
    public static final int EVENT_OUTPUT_MODE_CHANGE = 0;
    public static final int EVENT_DIGITAL_MODE_CHANGE = 1;
    public static final int EVENT_HDMI_PLUG_OUT = 2;
    public static final int EVENT_HDMI_PLUG_IN = 3;
    public static final int EVENT_HDMI_AUDIO_OUT = 4;
    public static final int EVENT_HDMI_AUDIO_IN = 5;
    public static final int EVENT_HDMI_CALIBRATION_DONE = 6;


On the result of log, our box is not generated EVENT_HDMI_PLUG_OUT event.
I think this is the root cause why android.intent.action.HDMI_PLUGGED intent is not occur.

Please note it
Thank you.
Kim

(ALTech) JunGyu Kim

2024-03-25 15:15

developer   ~0015293

Hi Jerry,

If I add ATV10's code to ATV12, I can see HDMIPLUGGED intent.

// vendor/amlogic/common/frameworks/services/systemcontrol/DisplayMode.cpp
void DisplayMode::onTxEvent (char* switchName, char* hpdstate, int outputState) {
    SYS_LOGD("onTxEvent switchName:%s hpdstate:%s state: %d\n", switchName, hpdstate, outputState);
    if (!strcmp(switchName, HDMI_CEDST_UEVENT)) {
        char* pos = strstr(hpdstate,"=");
        if (pos != NULL) {
            pos+=1;
            char decstr[MODE_LEN]={0};
            stpncpy(decstr,pos,strlen(hpdstate)-(pos-hpdstate));
            enterSpecialCase(decstr);
        }
        return;
    }
#ifndef RECOVERY_MODE
    DisplayModeMgr::getInstance().updateConnectorType();
    if (!strcmp(switchName, HDMI_UEVENT_HDMI_AUDIO) || !strcmp(switchName, UEVENT_HDMI_AUDIO)) {
        notifyEvent(hpdstate[0] == '1' ? EVENT_HDMI_AUDIO_IN : EVENT_HDMI_AUDIO_OUT);
        return;
    }

    if (!strcmp(switchName, HDMI_UEVENT_HDMI) && hpdstate[0] == '0') {
        notifyEvent(EVENT_HDMI_PLUG_OUT);
    }
    if (hpdstate) {
        if (hpdstate[0] == '1' && !strcmp(mHdmidata.dv_info.dv_enable, "0")) {
            char temp[EDID_MAX_SIZE] = {0};
            pSysWrite->readSysfs(DISPLAY_EDID_RAW, temp);
            if (memcmp(mEdid, temp, EDID_MAX_SIZE)) {
              // setBootEnv(UBOOTENV_BESTDOLBYVISION, "true");
                memcpy(mEdid, temp, EDID_MAX_SIZE);
            }
        }

############ Added this code #############
        notifyEvent((hpdstate[0] == '1') ? EVENT_HDMI_PLUG_IN : EVENT_HDMI_PLUG_OUT);
#######################################
        if (hpdstate[0] == '1')
            dumpCaps();
    }
#endif

Note please. Also, please review whether there will be any problems if you make this modification.
Thank you.
Kim

(SW) Jerry Lin

2024-03-25 20:24

developer   ~0015297

Hi Kim,
I think this modification is ok.
But i found that the EVENT_HDMI_PLUG_IN event was received twice.
I also test the unplug and plug HDMI cable or suspend/resume via RCU.
The test result is ok.

Jerry

(ALTech) JunGyu Kim

2024-03-26 08:59

developer   ~0015298

Hi Jerry,

Due to the ACTION_HDMI_PLUGGED duplicate issue, Amlogic has released a patch.
This patch was released for ATV10, but was not released for ATV12 due to other issues at the time.
Please check if there is any duplicate after applying this patch.

11/06 6270966011f vendor: Fixed to not send duplicate ACTION_HDMI_PLUGGED intent vendor/amlogic/common BPM-23966

Note that, I checked the INTEK box again and found that this intent is not duplicated here.

Thank you.
Kim

(ALTech) JunGyu Kim

2024-03-26 14:36

developer   ~0015303

Hi Jerry,

On my test result, if apply amlogic's patch, EVENT_HDMI_PLUG_IN is not occur.
Please forget this patch.

Anyway, the root cause, switchName is different.
based on code : hdmi
Current : hdmitx_hpd

So, if we fix as below from original code, duplicate EVENT_HDMI_PLUG_IN issue is cleared.
============================================================
    if (!strcmp(switchName, UEVENT_HPD) && hpdstate[0] == '0') {
        notifyEvent(EVENT_HDMI_PLUG_OUT);
    }
============================================================

But I'm not sure we can change this.
Could you please check it?

Thank you.
Kim

(ALTech) JunGyu Kim

2024-03-27 10:32

developer   ~0015314

Hi Jerry,

The first VCS BMT schedule is until March 29th.
Please support to fix this issue until BMT schedule.

Thank you.
Kim

(ALTech) Younkwang Jung

2024-03-27 18:01

developer   ~0015319

Hi Jerry

Please update the progress.
We have to release the New FW on BMT tomorrow. It have to be resolved before then.

Thank you
YK.Jung

(SW) Jerry Lin

2024-03-27 20:43

developer   ~0015320

Last edited: 2024-03-27 20:47

Hi YK,
I check the modified code and test standby/passive standy in office,
It's ok.
Please help to check TVs in your side.

Jerry

(ALTech) JunGyu Kim

2024-03-28 09:48

developer   ~0015323

Hi Jerry,

On my side, standby / passive standby are no problem.
Please commit this modification.
Please use BPM-30300 jira ticket when you commit it.

Thank you.
Kim

(SW) Jerry Lin

2024-03-28 10:05

developer   ~0015325

Hi Kim ,
commit done!

Jerry

(ALTech) JunGyu Kim

2024-03-28 12:04

developer   ~0015326

Thank you for support.
I close this issue.
Kim

Issue History

Date Modified Username Field Change
2024-03-19 14:43 (ALTech) JunGyu Kim New Issue
2024-03-19 14:43 (ALTech) JunGyu Kim Status new => assigned
2024-03-19 14:43 (ALTech) JunGyu Kim Assigned To => (SW) Kerwin Chen
2024-03-19 14:43 (ALTech) JunGyu Kim Issue Monitored: (ALTech) SY Yoon
2024-03-19 14:43 (ALTech) JunGyu Kim Issue Monitored: (ALTech) Younkwang Jung
2024-03-19 20:28 (SW) Kerwin Chen Severity s2-severe => s4-minor
2024-03-19 20:29 (SW) Kerwin Chen Assigned To (SW) Kerwin Chen => (SW) Jerry Lin
2024-03-21 08:52 (ALTech) JunGyu Kim Note Added: 0015274
2024-03-25 12:19 (ALTech) JunGyu Kim Note Added: 0015290
2024-03-25 13:38 (ALTech) JunGyu Kim Note Added: 0015291
2024-03-25 15:15 (ALTech) JunGyu Kim Note Added: 0015293
2024-03-25 20:24 (SW) Jerry Lin Note Added: 0015297
2024-03-26 08:59 (ALTech) JunGyu Kim Note Added: 0015298
2024-03-26 14:36 (ALTech) JunGyu Kim Note Added: 0015303
2024-03-27 10:32 (ALTech) JunGyu Kim Note Added: 0015314
2024-03-27 15:10 (ALTech) Younkwang Jung Priority normal => high
2024-03-27 18:01 (ALTech) Younkwang Jung Note Added: 0015319
2024-03-27 20:43 (SW) Jerry Lin Note Added: 0015320
2024-03-27 20:45 (SW) Jerry Lin Note Edited: 0015320
2024-03-27 20:47 (SW) Jerry Lin Note Edited: 0015320
2024-03-28 09:48 (ALTech) JunGyu Kim Note Added: 0015323
2024-03-28 10:05 (SW) Jerry Lin Note Added: 0015325
2024-03-28 12:04 (ALTech) JunGyu Kim Status assigned => closed
2024-03-28 12:04 (ALTech) JunGyu Kim Resolution open => fixed
2024-03-28 12:04 (ALTech) JunGyu Kim Note Added: 0015326